<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>预约详情</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="/lobsteruiframe/weui/css/weui.css" />
    <link rel="stylesheet" href="/lobsteruiframe/weui/css/weuix.css" />
    <script src="/lobsteruiframe/weui/js/zepto.min.js"></script>
    <script src="/lobsteruiframe/weui/js/zepto.weui.js"></script>
    <script src="/lobsteruiframe/weui/js/swipe.js"></script>
    <script src="/lobsteruiframe/weui/js/macy.js"></script>
    <script src="/jslib/lobster.js"></script>
    <script src="/jslib/template-web.js"></script>

</head>

<body ontouchstart>
    <div class="page-hd">
        <h1 class="page-hd-title">
            订单详情
        </h1>
        <p class="page-hd-desc"></p>
    </div>
    <div class="page-bd">

        <div class="weui-cells" id="record" style="margin-top: 0;">

        </div>
        <div class="weui-cells" id="patient" style="margin-top: 0;">

        </div>
       
    </div>

</body>

</html>

<script>
    lobsterh5.main({
        data: {
            recordinfo: {},
            id: -1,
            machId: "",
        },
        pageload() {
            this.data.id = lobsterh5.GetUrlParam("id");
            this.initdata(); 
        }, 
        initdata() {
            var self = this;
            var data = {
                id: self.data.id
            };
            lobsterh5.GETAPI("tsregister.getRegisterInfo", data).then(res => {
                self.data.recordinfo = res.info;
                $("#lableAmt").html(" 金额:￥" + self.data.recordinfo.PayAmt);
                self.inittemp("tplrecord", "record", self.data.recordinfo);
                self.inittemp("tplpatient", "patient", self.data.recordinfo);
            }).catch(res => {
                console.log(res);
            }) 

        },
        inittemp(tempid, _id, data) {
            var html = template(tempid, data);
            $("#" + _id).html(html);
        },

     });

    

</script>

<script type="text/template" id="tplrecord">
<div class="weui-panel__hd">预约信息</div>
<div class="weui-cell">
    <div class="weui-cell__bd">
        <p>下单时间：</p>
    </div>
    <div class="weui-cell__ft">{{CreateTime}}</div>
</div>

<div class="weui-cell">
    <div class="weui-cell__bd">
        <p>订单号：</p>
    </div>
    <div class="weui-cell__ft">{{TranSerNo}}</div>
</div>

<div class="weui-cell">
    <div class="weui-cell__bd">
        <p>就诊科室：</p>
    </div>
    <div class="weui-cell__ft">{{DeptName}}</div>
</div>

<div class="weui-cell">
    <div class="weui-cell__bd">
        <p>就诊医生：</p>
    </div>
    <div class="weui-cell__ft">{{EmpName}}</div>
</div>
 
<div class="weui-cell">
    <div class="weui-cell__bd">
        <p>就诊日期：</p>
    </div>
    <div class="weui-cell__ft">{{RegDate}}</div>
</div>
<div class="weui-cell">
    <div class="weui-cell__bd">
        <p>时段：</p>
    </div>
    <div class="weui-cell__ft">{{RegSchedType==1?"上午":"下午"}}{{RegRange}}</div>
</div>
<div class="weui-cell">
    <div class="weui-cell__bd">
        <p>费用：</p>
    </div>
    <div class="weui-cell__ft">￥{{PayAmt}}</div>
</div>

</script>

<script type="text/template" id="tplpatient">
    <div class="weui-panel__hd">患者信息</div>
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <p>姓名：</p>
        </div>
        <div class="weui-cell__ft">{{PatName}}</div>
    </div>
     
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <p>诊疗卡号：</p>
        </div>
        <div class="weui-cell__ft">{{CardNum}}</div>
    </div>  
    </script>